const state = {
  serviceInfo: null
}

const mutations = {
  SET_SERVICE_INFO(state, info) {
    state.serviceInfo = info
  },
  UPDATE_SERVICE_STATUS(state, status) {
    if (state.serviceInfo) {
      state.serviceInfo.status = status
    }
  }
}

const actions = {
  setServiceInfo({ commit }, info) {
    commit('SET_SERVICE_INFO', info)
  },
  updateServiceStatus({ commit }, status) {
    commit('UPDATE_SERVICE_STATUS', status)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
} 